import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './style/index.css'


// 完整引入Element ui框架
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import * as ElIcon from '@element-plus/icons-vue'
import Echarts from 'vue-echarts'
import * as echarts from 'echarts'
import i18n from './i18n/index'
import './style/elemmentPlus.scss'
import './style/app.scss'

import { createPinia } from 'pinia'

// 导出Excel
import FileSaver from 'file-saver'
import XLSX from 'xlsx'

// swiper框架（轮播图）
import vueSwiper from 'vue-awesome-swiper'
import 'swiper/swiper-bundle.css'

// 将自动注册所有组件为全局组件
// import dataV from '@jiaminghi/data-view'
// import DataV from '@dataview/datav-vue3'

const app = createApp(App)
for (const iconName in ElIcon) {
  app.component(iconName, ElIcon[iconName])
}
app.use(ElementPlus, { locale: zhCn })
  .use(store)
  .use(router)
  .use(i18n)
  // .use(dataV)
  // .use(DataV, { classNamePrefix: 'dv-' })
  .use(ElementPlus)
  .use(createPinia())
  .component('v-chart', Echarts)
  .mount('#app')
app.config.globalProperties.$echarts = echarts
